The technology described herein relates to graphics processing systems, and in particular to methods of and apparatus for taking into account the effects of refraction when rendering images for display.
When rendering images, such as output frames, for display in graphics processing systems, it is often desirable to be able to take account of the effects of refraction in the scene being rendered. These effects may be present whenever a transparent or semi-transparent object appears in the scene. Various rendering techniques try to do this.
One such technique is so-called “ray tracing”. In this technique the path of a light ray is traced through each pixel in the image plane and the effects of its encounters with objects in the scene is simulated.
While ray tracing can be an effective technique for allowing the effects of refraction to be taken into account when rendering images, it is in general very computationally expensive. Ray tracing is not therefore typically appropriate for rendering images in situations where the processing power of the graphics processing system is limited. This could, e.g., particularly be the case where it is desired to render an image using, e.g., a mobile device that may accordingly have limited processing capacity.
Another technique for taking into account the effects of refraction makes use of so-called “perturbed textures”. In this technique, the parts of the scene that are behind the transparent or semi-transparent object (e.g. relative to the viewpoint (camera) position) are firstly rendered to texture. The texture is then subjected to some form of perturbation, e.g. such that when the texture is subsequently applied to the object a “refractive look” is achieved for the object.
Because this technique is based on a perturbation of a texture, it does not properly take into account the real-world physical effects of refraction, and so the resulting image can often be unrealistic. Additionally, this technique cannot take into account areas of the scene that are outside the field of view of the camera but that would otherwise be visible due the effects of refraction. Distortions and instabilities such as pixel shimmering are also typically present. This can be particularly noticeable where the effects of refraction are important in a scene, e.g. when displaying a close-up of a complex transparent or semi-transparent object, and/or when the camera is moving.
Furthermore, using this technique it is necessary to regenerate the texture whenever the viewpoint (camera) position changes (which can happen each frame). This can be relatively expensive, e.g. in terms of processing, memory and bandwidth resources for preparing, storing and using the texture.
The Applicants believe therefore that there remains scope for improved techniques for rendering refractions in graphics processing systems.
Like reference numerals are used for like components where appropriate in the drawings.